import request from '@/utils/request'

// 查询同行借调列表
export function listSeconded(query) {
  return request({
    url: '/seconded/seconded/list',
    method: 'get',
    params: query
  })
}
export function monthListSeconded(query) {
  return request({
    url: '/seconded/seconded/monthList',
    method: 'get',
    params: query
  })
}
export function listCount(query) {
  return request({
    url: '/seconded/seconded/listCount',
    method: 'get',
    params: query
  })
}

// 查询同行借调详细
export function getSeconded(id) {
  return request({
    url: '/seconded/seconded/' + id,
    method: 'get'
  })
}

// 新增同行借调
export function addSeconded(data) {
  return request({
    url: '/seconded/seconded',
    method: 'post',
    data: data
  })
}

// 修改同行借调
export function updateSeconded(data) {
  return request({
    url: '/seconded/seconded',
    method: 'put',
    data: data
  })
}
//结束借调
export function endEdit(data) {
  return request({
    url: '/seconded/seconded/endEdit',
    method: 'put',
    data: data
  })
}

// 删除同行借调
export function delSeconded(id) {
  return request({
    url: '/seconded/seconded/' + id,
    method: 'delete'
  })
}

// 导出同行借调
export function exportSeconded(query) {
  return request({
    url: '/seconded/seconded/export',
    method: 'get',
    params: query
  })
}
